from MySQLPool import *

table_name="SYS_USER"

def queryByUsername(username):
    if username is not None:
        with dbpool.get_connection() as connection:
            user=connection.query("select * from {table_name} where logic_del_flag=0 and username = %(username)s",{"username":username})
            if user is None:
                return None
            else:
                return user
    return None